<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>评价-去保养-氦修驿站旗下品牌</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="keywords" content="汽车保养,汽车配件,汽车维修,养车无忧,养车,4S店品质,氦修驿站,丰田保养" />
    <meta name="description" content="100%正品配件,4S店一半价格,先行赔付,闪电送达!线上购买配件,线下提供安装.上万用户的最佳选择!去掉中间环节,直接从源头采购配件!" />
	<link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/css/base.css">
    <link rel="stylesheet" type="text/css" href="{:C('WEB_URL')}Public/mobile/css/master.css">
</head>
<body>
    <header class="tcenter fs14">
        <a href="tel:4006730088" class="tel iconfont">&#xe610;</a>
        <a href="{:C('WEB_URL')}mobile/" class="iconfont fright hide">&#xe60f;</a>
        <a href="javascript:window.location.href=document.referrer" class="iconfont fleft">&#xe612;</a>
        发表评论
    </header>

    <style>
        .back{background:#f60;color:#fff;text-align:center;font-size:14px;position:fixed;bottom:0px;height:40px;line-height:40px;display:none;width:100%;}
    </style>
    <div class="comment">
        <p class="star">
            评星：
            <i>&#xe618;</i><i>&#xe618;</i><i>&#xe618;</i><i>&#xe618;</i><i>&#xe618;</i>
            <input type="hidden" id="J_score" name="score" value="0" />
        </p>
        <textarea id="J_commentTxt" placeholder="请输入任何您想表达的内容"></textarea>
        <a href="javascript:window.location.href=document.referrer"  class="back" id="J_btnReturn">返 回</a>

        <a href="javascript:void(0)" class="btnBlue" id="J_btnSubmit" >提 交</a>
        
    </div>
    <include file="Public/mobileHome" />

    <script>
        $(function(){
            var _t=this;
            $(".star").on("click",function(e){
                if(e.target.tagName=="I"){
                    var element=e.target,
                        index=$(element).index()*1+1;

                    $("#J_score").val(index);
                    $(".star").find("i").each(function(i){
                        if(i>=index){
                            $(this).removeClass("selected");
                        }else{
                            $(this).addClass("selected");
                        }
                    })
                }
            })

            $("#J_btnSubmit").on("click",function(){
                var content = $("#J_commentTxt").val(),
                    pingfen = $("#J_score").val(),
                    order_id=getQuery("order_id");

                if(pingfen==0){
                    showMsgTip("请选择一个星级",2000);
                    return false;
                }else if(content==""){
                    showMsgTip("随便说点什么吧！",2000);
                    return false;
                }

                $.ajax({
                    url:"{:C('WEB_URL')}mobile/commentInset.html",
                    type:"POST",
                    data:{"order_id":order_id,"content":content,"pingfen":pingfen},
                    datType:"JSON",
                    success:function(res){
                        if(res.status==1){
                            //评论成功
                            $("#J_commentTxt").attr({"disabled":"disabled"}).css({"border":"0px","background":"#fff"});
                            $("#J_btnSubmit").remove();
                            $("#J_btnReturn").show();
                        }
                        showMsgTip(res.info,2000);
                        return false;
                    }
                })
            })
        })
        
    </script>
    

</body>
</html>